package com.seeyon.apps.ebs.rc.utils;

import com.seeyon.apps.ebs.rc.info.RcUserInfo;

import java.util.Collections;
import java.util.Comparator;
import java.util.List;

public class RcMemberSortUtils {

    /**
    * 功能:升序
    * @Date: 2025/2/20
    */
    public static List<RcUserInfo> sortByFateAsc(List<RcUserInfo> users) {
        Collections.sort(users, Comparator.comparingInt(RcUserInfo::getFate));
        return users;
    }

    /**
    * 功能:降序
    * @Date: 2025/2/20
    */
    public static List<RcUserInfo> sortByFateDesc(List<RcUserInfo> users) {
        Collections.sort(users, Comparator.comparingInt(RcUserInfo::getFate).reversed());
        return users;
    }
}
